/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 5/16/18
Time: 9:56 AM
 */

package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.Additional.IName
import Cn.Sarkar.Entities.IMS.IArea
import Cn.Sarkar.Entities.IMS.IIMSApplicationDomain
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.Areas
import Cn.Sarkar.Entities.Common.BaseEntity

class Area(DataContext: IDataContext) : BaseEntity(DataContext, Areas), IArea {
    var applicationDomainID by Areas.ApplicationDomainID
    override var applicationDomain: IIMSApplicationDomain by hasOne(Areas.ApplicationDomainID) { IMSApplicationDomain(it) }
    var nameID by Areas.NameID
    override var name: IName by hasOne(Areas.NameID) { Name(it) }
    //    override var code: String
    var parentID by Areas.ParentID
    override var parent: IArea by hasOne(Areas.ParentID) { Area(it) }
    override var category: Int by Areas.Category
}